// 电影模块的路由文件
// 后续张三负责的电影模块，路由都写在这里

import Index from "@/views/films/Index.vue";
import NowPlaying from "@/views/films/NowPlaying.vue";
import ComingSoon from "@/views/films/ComingSoon.vue";
import Detail from "@/views/films/Detail.vue";

// 定义当前模块的路由规则，由于可能是很多的路由，因此使用数组格式
const filmsRoutes = [
    // 嵌套路由
    {
        path: "/films",
        component: Index,
        children: [
            { path: "nowPlaying", component: NowPlaying },
            { path: "comingSoon", component: ComingSoon },
        ],
    },
    // 电影详情
    {
        path: "/film/:filmId",
        component: Detail
    }
];

// es6的模块化导出规范语法
export default filmsRoutes;
